local yuehuangshi = fk.CreateSkill {
  name = "lzsj__yuehuangshi",
  tags = { "Round" },
}

Fk:loadTranslationTable{
  ["lzsj__yuehuangshi"] = "越荒时",
  [":lzsj__yuehuangshi"] = "轮次技，其他角色使用黑色基本牌时，你可令之无效，然后其将之当【兵粮寸断】对你使用。",
  ["#lzsj__yuehuangshi"] = "越荒时：你可令%src使用的%arg无效",

  ["$lzsj__yuehuangshi1"] = "树皮嚼碎了咽下去，子弹嚼碎了吐出来！",
  ["$lzsj__yuehuangshi2"] = "雪地埋火种，寒夜藏刀锋！",
}

yuehuangshi:addEffect(fk.CardUsing, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(yuehuangshi.name) and target ~= player and player:usedSkillTimes(yuehuangshi.name, Player.HistoryRound) == 0
    and data.card.type == Card.TypeBasic and data.card.color == Card.Black
  end,
  on_cost = function(self, event, target, player, data)
    return player.room:askToSkillInvoke(player,
    { skill_name = yuehuangshi.name, prompt = "#lzsj__yuehuangshi:"..target.id.."::"..data.card:toLogString() })
  end,
  on_use = function(self, event, target, player, data)
    data.toCard = nil
    data:removeAllTargets()
    local name = "supply_shortage"
    if table.contains(Fk:getAllCardNames("d"), "lvshi__supply_shortage") then name = "lvshi__supply_shortage" end
    if #player.room:getSubcardsByRule(data.card) == 1 then
      player.room:useVirtualCard(name, player.room:getSubcardsByRule(data.card), target, player, yuehuangshi.name, true)
    end
  end,
})

return yuehuangshi